package com.popupwindowdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

/**
 * Created by Administrator on 2017/7/7/007.
 */

public class SubjectKindActivity  extends AppCompatActivity{

    private LinearLayout LayoutImportantFour;
    private LinearLayout LayoutImportantFive;
    private LinearLayout LayoutImportantSix;

    private ImageView IvImportantFour;
    private ImageView IvImportantFive;
    private ImageView IvImportantSix;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_subject_kind);

        LayoutImportantFour = (LinearLayout) findViewById(R.id.layout_important_four);
        IvImportantFour = (ImageView) findViewById(R.id.iv_important_four);

        LayoutImportantFive = (LinearLayout) findViewById(R.id.layout_important_five);
        IvImportantFive = (ImageView) findViewById(R.id.iv_important_five);

        LayoutImportantSix = (LinearLayout) findViewById(R.id.layout_important_six);
        IvImportantSix = (ImageView) findViewById(R.id.iv_important_six);

        IvImportantFour.setVisibility(View.VISIBLE);
        IvImportantFive.setVisibility(View.INVISIBLE);
        IvImportantSix.setVisibility(View.INVISIBLE);


        LayoutImportantFour.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IvImportantFour.setVisibility(View.VISIBLE);
                IvImportantFive.setVisibility(View.INVISIBLE);
                IvImportantSix.setVisibility(View.INVISIBLE);
            }
        });



        LayoutImportantFive.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IvImportantFour.setVisibility(View.INVISIBLE);
                IvImportantFive.setVisibility(View.VISIBLE);
                IvImportantSix.setVisibility(View.INVISIBLE);
            }
        });



        LayoutImportantSix.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IvImportantFour.setVisibility(View.INVISIBLE);
                IvImportantFive.setVisibility(View.INVISIBLE);
                IvImportantSix.setVisibility(View.VISIBLE);
            }
        });

    }
}
